﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Data.Services;
using compshop;



namespace CompShop.WCFDataService
{
    class Program
    {
        static void Main(string[] args)
        {
            string srvAddr = "http://localhost:8008/CompShop";
            WebServiceHost host = new WebServiceHost(typeof(CompShopDataService),
                                  new Uri(srvAddr));
            WebHttpBinding binding = new WebHttpBinding();
            host.AddServiceEndpoint(typeof(IRequestHandler),
                                    binding, "WebServiceHost");
            host.Open();
            Console.WriteLine("Service is running at {0}", srvAddr);
            Console.WriteLine("Press any key to stop the Service");
            Console.Read();
            host.Close();
        }
    }
}
